/*
 * 
 * Copyright 2010 David H Pollack
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. 
 * 
 * 
 */

package com.dhpollack.rotogss.data;

import java.util.List;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * @author davidpl
 *
 */
@PersistenceCapable
public class YPlayers {

    @PrimaryKey
    @Persistent
    private Key key;
    
    @Persistent
    private Key gameKey;
    
    @Persistent
    private String firstName;

    @Persistent
    private String lastName;

    @Persistent
    private String fullName;

    @Persistent
    private String asciiFirstName;

    @Persistent
    private String asciiLastName;

    @Persistent
    private String ePK;

    @Persistent
    @Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
    private String eTK;
    
    @Persistent
    @Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
    private String eTFN;
    
    @Persistent
    private String eTA;
    
    @Persistent
    @Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
    private Integer uniNum;
    
    @Persistent
    private String dispPos;
    
    @Persistent
    @Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
    private String iUrl;
    
    @Persistent
    private Boolean isDroppable;
    
    @Persistent
    private List<String> eliPos;

	public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	public Key getGameKey() {
		return gameKey;
	}

	public void setGameKey(Key gameKey) {
		this.gameKey = gameKey;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getAsciiFirstName() {
		return asciiFirstName;
	}

	public void setAsciiFirstName(String asciiFirstName) {
		this.asciiFirstName = asciiFirstName;
	}

	public String getAsciiLastName() {
		return asciiLastName;
	}

	public void setAsciiLastName(String asciiLastName) {
		this.asciiLastName = asciiLastName;
	}

	public String getePK() {
		return ePK;
	}

	public void setePK(String ePK) {
		this.ePK = ePK;
	}

	public String geteTK() {
		return eTK;
	}

	public void seteTK(String eTK) {
		this.eTK = eTK;
	}

	public String geteTFN() {
		return eTFN;
	}

	public void seteTFN(String eTFN) {
		this.eTFN = eTFN;
	}

	public String geteTA() {
		return eTA;
	}

	public void seteTA(String eTA) {
		this.eTA = eTA;
	}

	public Integer getUniNum() {
		return uniNum;
	}

	public void setUniNum(Integer uniNum) {
		this.uniNum = uniNum;
	}

	public void setUniNum(String uniNum) {
		if(uniNum.equals("00")) {
			this.uniNum = -1;
		} else {
			this.uniNum = Integer.valueOf(uniNum);
		}
	}

	public String getDispPos() {
		return dispPos;
	}

	public void setDispPos(String dispPos) {
		this.dispPos = dispPos;
	}

	public String getiUrl() {
		return iUrl;
	}

	public void setiUrl(String iUrl) {
		this.iUrl = iUrl;
	}

	public Boolean getIsDroppable() {
		return isDroppable;
	}

	public void setIsDroppable(Boolean isDroppable) {
		this.isDroppable = isDroppable;
	}

	public void setIsDroppable(String isDroppable) {
		if(isDroppable.equals("0")) {
			this.isDroppable = false;
		} else {
			this.isDroppable = true;
		}
	}

	public List<String> getEliPos() {
		return eliPos;
	}

	public void setEliPos(List<String> eliPos) {
		this.eliPos = eliPos;
	}
    
    

}
